<?php

    return showadv();
    
    function CreateRefBanner($name=null, $x=468, $y=60, $imagepath)
    {
        global $mikron;
        $path = 'http://'.$_SERVER['HTTP_HOST'];
        return Array('name'=>$name, 'content'=>$mikron->Users->CurrentUser()->ReferalLink(true,
        sprintf('<img src="%s" width="%s" height="%s" alt="7chances" title="Бесплатные игры на деньги!" />', $path.$imagepath, $x, $y)));
    }

    function showadv()
    {
        global $mikron;
        $banners = Array();
        $banners[] = CreateRefBanner('Банер 468х60', 468, 60, '/images/7chances1.png');
        $banners[] = CreateRefBanner('2-ой банер 468х60', 468, 60, '/images/7chances2.png');
        foreach($banners as $banner)
        {
            $name = $banner['name'];
            $content = $banner['content'];
            echo "<h2>$name:</h2>$content<br /><textarea cols=\"56\" rows=\"4\">$content</textarea>";
            
        }
    }

?>